<?php
namespace app\common\model;

use think\Model;

class MerchatsShops extends Model
{
    protected $pk = 'adm_id';
//    echo $insert;
    public function role(){
        return $this->belongsTo('AdminsRole','adm_role','role_id')->field('role_id,role_name');
    }

    public function getAdmStatusAttr($value)
    {
        $status = [0=>'禁用',1=>'启用'];
        return $status[$value];
    }
}